package com.usian.behavior.controller;

import com.usian.apis.behavior.ApLikesBehaviorControllerApi;
import com.usian.behavior.service.ApLikesBehaviorService;
import com.usian.model.article.dtos.ArticleInfoDto;
import com.usian.model.behavior.dtos.LikesBehaviorDto;
import com.usian.model.behavior.pojos.ApLikesBehavior;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: ApLikesBehaviorController
 * Author:   WGG
 * Date:    2022-12-2022/12/1-14:36
 * Version: 1.0
 * Description:
 */
@RestController
@RequestMapping("/behavior/api/v1")
public class ApLikesBehaviorController implements ApLikesBehaviorControllerApi {


    @Autowired
    private ApLikesBehaviorService apLikesBehaviorService;

    @Override
    @PostMapping("/likes_behavior")
    public ResponseResult likesBehavior(@RequestBody LikesBehaviorDto dto) {
        return apLikesBehaviorService.likesBehavior(dto);
    }

    @Override
    @PostMapping("/show_likes_behavior")
    public ApLikesBehavior showLikesBehavior(@RequestBody ArticleInfoDto dto) {
        return apLikesBehaviorService.showLikesBehavior(dto);
    }
}
